//package com.sunday.volunteer.ui;
//
//import android.content.Intent;
//import android.os.Bundle;
//import android.view.animation.AlphaAnimation;
//import android.view.animation.Animation;
//import android.widget.ImageView;
//
//import com.sunday.iblue.R;
//import com.sunday.iblue.utils.StatusBarUtil;
//import com.sunday.member.base.BaseActivity;
//import com.sunday.member.common.MemberConst;
//import com.sunday.member.utils.SharePerferenceUtils;
//
//import butterknife.Bind;
//import butterknife.ButterKnife;
//
//
///**
// * Created by Administrator on 2016/3/3.
// */
//public class SplashActivity extends BaseActivity {
//    @Bind(R.id.splash_image)
//    ImageView splashView;
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_splash);
//        ButterKnife.bind(this);
//
//        StatusBarUtil.setTransparentForImageView(this , null);
//
//        AlphaAnimation animation = new AlphaAnimation(0.3f, 1.0f);
//        animation.setDuration(2000);
//        splashView.startAnimation(animation);
//        animation.setAnimationListener(new Animation.AnimationListener() {
//            @Override
//            public void onAnimationStart(Animation animation) {
//
//            }
//
//            @Override
//            public void onAnimationEnd(Animation animation) {
//                boolean isLogin = SharePerferenceUtils.getIns(mContext).getBoolean(MemberConst.IS_LOGIN, false);
//                boolean isFirst = SharePerferenceUtils.getIns(mContext).getBoolean("is_first",true);
//                if (isFirst) {
//                        intent = new Intent(mContext, MainActivity.class);
//                } else {
//                        intent = new Intent(mContext, MainActivity.class);
//                }
//                startActivity(intent);
//                finish();
//            }
//
//            @Override
//            public void onAnimationRepeat(Animation animation) {
//
//            }
//        });
//        //getData();
//    }
//
////    private void getData(){
////        Call<ResultDO> call = HttpClient.getHttpAdapter().splash(null);
////        call.enqueue(new Callback<ResultDO>() {
////            @Override
////            public void onResponse(Call<ResultDO> call, Response<ResultDO> response) {
////                if(response.body() == null || isFinish){
////                    return;
////                }
////                if(response.body().getCode() == 0 &&response.body().getResult() != null){
////                    int width  = DeviceUtils.getDisplay(mContext).widthPixels;
////                    int height = DeviceUtils.getDisplay(mContext).heightPixels;
////                    String image = response.body().getResult().toString().substring(1,response.body().getResult().toString().length()-1);
////                    Picasso.with(mContext).load(NoUtil(image, ""))
////                            .resize(width,height)
////                            .memoryPolicy(NO_CACHE, NO_STORE)
////                            .config(Bitmap.Config.RGB_565)
////                            .into(splashView);
////                    Log.d("aaaa" , NoUtil(image , ""));
////                }
////            }
////
////            @Override
////            public void onFailure(Call<ResultDO> call, Throwable t) {
////
////            }
////        });
////    }
//
//}
